feat: support local package artifacts in requirements#3095
Conversation
|
LGTM |
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR adds support for staging local wheel/source-archive paths from requirements.txt through the cog_build context before pip install. Overall the approach is clean and well-tested. I found one issue where a valid pip syntax that references local paths can slip through and cause a confusing build failure.
|
I'm Bonk, and I've done a quick review of your PR. This PR adds support for staging local wheel/source-archive paths from requirements.txt through the cog_build context before pip install. Overall the approach is clean and well-tested. I found one issue where a valid pip syntax that references local paths can slip through and cause a confusing build failure. Posted a batch review with 2 suggestions on PR #3095: |
|
@anish-sahoo Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
2 similar comments
|
@anish-sahoo Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
|
@anish-sahoo Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
|
LGTM |
Summary
Fixes #1945
Supported examples
Users can list local artifacts directly in their requirements file:
Paths are resolved relative to the requirements file and must point to regular files inside the project. Cog stages those files before the generated
pip install -r /tmp/requirements.txtlayer, without copying the full source tree earlier.Not supported in this PR:
build.run: pip install ./artifact.zipname @ file:...--find-linksdirectories